//
//  StarTeamCollectionViewCell.m
//  ceshiNET
//
//  Created by mk on 15/8/18.
//  Copyright (c) 2015年 mk. All rights reserved.
//

#import "StarTeamCollectionViewCell.h"

@implementation StarTeamCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
    
        
        self.teamImage = [[UIImageView alloc]init];
        [self addSubview:self.teamImage];
        self.teamImage.backgroundColor = [UIColor blueColor];
        
        self.nameLabel = [[UILabel alloc]init];
        [self addSubview:self.nameLabel];
        self.nameLabel.backgroundColor = [UIColor whiteColor];
        
        self.facultyLabel = [[UILabel alloc]init];
        [self addSubview:self.facultyLabel];
        
        
    }
 
    return self;
}
- (void)layoutSubviews{
    [super layoutSubviews];
    
    self.teamImage.frame = CGRectMake(30, 0, 70,70);
    self.teamImage.layer.cornerRadius = 35;
    self.teamImage.clipsToBounds = YES;
    
    self.nameLabel.frame = CGRectMake(0, 70, self.frame.size.width, 30);
    self.nameLabel.font = [UIFont systemFontOfSize:12];
    self.nameLabel.textAlignment = NSTextAlignmentCenter;
   
    self.facultyLabel.frame = CGRectMake(0, 100, self.frame.size.width, 30);
    self.facultyLabel.font = [UIFont systemFontOfSize:12];
    self.facultyLabel.textAlignment = NSTextAlignmentCenter;
    
}
-(void)setExper:(ExpertTeams *)exper{
    if (_exper != exper) {
        _exper = exper;
    }
    self.facultyLabel.text = self.exper.faculty;
    self.nameLabel.text = self.exper.teamName;
}
@end
